#pragma once
#include "RBTree.h"

namespace real {
	template <class K>
	class set
	{
		struct SetKeyOfT {
			const K& operator()(const K& key)
			{
				return key;
			}
		};
		RBTree<K, const K, SetKeyOfT> rb_tree;

	public:
		using iterator = typename RBTree<K, const K, SetKeyOfT>::iterator;
		using const_iterator = typename RBTree<K, const K, SetKeyOfT>::const_iterator;

		iterator begin() {
			return rb_tree.begin();
		}
		iterator end() {
			return rb_tree.end();
		}
		const_iterator begin() const {
			return rb_tree.begin();
		}
		const_iterator end() const {
			return rb_tree.end();
		}
		std::pair<iterator, bool> insert(const K& key) {
			return rb_tree.Insert(key);
		}
		iterator find(const K& key) {
			return rb_tree.Find(key);
		}

	};
}
